package day06;

public class ShapeFactory {
	public   static int CIRCLE =1;
	public static final int RECT =2;
	public static final int SQUARE =3;
public static Shape getShape(int type) {
	
	Shape s =null;
	if (type == CIRCLE) {
		s =new Circle();
	} else if(type == RECT) {
		s =new Rect();
	}else if(type == SQUARE) {
		s =new Square();
	}
	else {
		System.out.println("输入有误");
	}
	return s;
	
}

}
